package com.hx.shape;

import android.graphics.Canvas;
import android.graphics.Paint;
import android.graphics.RectF;

public class HxRect extends Shape{
	public HxRect(){
		
	}
	public HxRect(float x,float y){
		super(x,y);
	}
	public String toString(){
		return "Rect on ("+ sPnt.x + ","+ sPnt.y + "),(" + ePnt.x + "," + ePnt.y + ")";
	}

	public void paint(Canvas cv, Paint pt){
		float sx=0,sy=0,ex=0,ey=0;
		sx = Math.min(sPnt.x, ePnt.x);
		sy = Math.min(sPnt.y, ePnt.y);
		ex = Math.max(sPnt.x, ePnt.x);
		ey = Math.max(sPnt.y, ePnt.y);
		cv.drawRect(sx,sy, ex,ey, pt); 	
	}
}
